package controller;

import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.undo.UndoManager;

import view.LagerverwaltungGUI;
import view.MainPanel;
import view.StartFrame;
import view.StartMainPanel;

public class Controller {

	// Panels
	private MainPanel mainPanel;
	private LagerverwaltungGUI view;
	private StartFrame welcomeGUI;
	
	//Sub-Controller
	
	private TreePanelController treePanelController;
	private LieferungenController lieferungenController;
	private FootPanelController footPanelController;
	
	DefaultMutableTreeNode lagerRoot = new DefaultMutableTreeNode("Lager");

	private UndoManager manager = new UndoManager();

	public Controller() {
		LagerDateiVerwalter lagerDateiVerwalter = new LagerDateiVerwalter();
		this.mainPanel = new MainPanel(this);
		mainPanel.add( StartMainPanel.getStartseite() );
		this.treePanelController = new TreePanelController( this );
		this.footPanelController = new FootPanelController();
		this.lieferungenController = new LieferungenController();
		


		this.view = new LagerverwaltungGUI(mainPanel, treePanelController.getTreePanel(), footPanelController.getFootPanel());


		
//		this.welcomeGUI = new StartFrame();
		
	}


	
	
	
	public TreePanelController getTreePanelController() {
		return treePanelController;
	}





	public void setTreePanelController(TreePanelController treePanelController) {
		this.treePanelController = treePanelController;
	}





	public LieferungenController getLieferungenController() {
		return lieferungenController;
	}





	public void setLieferungenController(LieferungenController lieferungenController) {
		this.lieferungenController = lieferungenController;
	}





	public MainPanel getMainPanel() {
		return mainPanel;
	}


	public void setMainPanel(MainPanel mainPanel) {
		this.mainPanel = mainPanel;
	}


	public LagerverwaltungGUI getView() {
		return this.view;
	}


	public LieferungenController getStartBuchungenController() {
		return lieferungenController;
	}


	public void setStartBuchungenController(
			LieferungenController startBuchungenController) {
		this.lieferungenController = startBuchungenController;
	}
	

}
